package cn.fl.finance.service;

import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.finance.condition.FinRepayApplyInfoQC;
import cn.fl.finance.dto.FinRepayApplyInfoDTO;
import cn.fl.finance.util.FlowStartParmsVO;
import cn.fl.finance.vo.FinRepayApplyInfoVO;

import java.util.List;

/**
 * @Description: 还款申请信息表 客户端服务层接口
 * @Description: 持久层方法名称前缀：新增：insert* 删除：delete* 修改：update* 批量：batch* 查询对象：select* get* find* 查询集合：select*
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
public interface IFinRepayApplyInfoService {
	
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public FinRepayApplyInfoVO selectById(Long id)throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(FinRepayApplyInfoVO entity) throws BaseException;

    /**
     * 删除
     * @param id
     * @return
     */
    public boolean removeById(Long id)throws BaseException;
    
    /**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException;

    /**
     * 修改
     * @param entity
     * @return
     */
    public boolean modify(FinRepayApplyInfoVO entity)throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page)throws BaseException;
    
    /**
     * 发起还款流程
     * @param vo 流程启动参数
     * @return
     */
	public DataResultDTO addFlowStart(FlowStartParmsVO vo);

    /**
     * 下拉数据
     * @return
     * @throws BaseException
     */
    public List<KeyValueVO> searchCdList(String grpCd) throws BaseException;

    /**
     * 查询借款付款信息
     * @return
     * @throws BaseException
     */
    public List<FinRepayApplyInfoVO> selectPayInfoByQc(FinRepayApplyInfoQC finRepayApplyInfoQC) throws BaseException;

    /**
     * 下拉数据 根据code_lvl
     * @return
     * @throws BaseException
     */
    public List<KeyValueVO> searchCdListByLvl(String grpCd, Integer codeLvl) throws BaseException;

    /**
     * 下拉数据 根据父级 p_code
     * @return
     * @throws BaseException
     */
    public List<KeyValueVO> searchChild(String grpCd, String acceptBkCd) throws BaseException;

    /**
     * 根据支付明细ID查询还款申请记录
     * @return
     * @throws BaseException
     */
    public List<FinRepayApplyInfoVO> selectRepayHis(FinRepayApplyInfoQC finRepayApplyInfoQC) throws BaseException;

    /**
     * 还款明细
     * @param condition
     * @return
     * @throws BaseException
     */
    public List<FinRepayApplyInfoDTO> selectDetailList(FinRepayApplyInfoQC condition) throws BaseException;
}
